package mysql

import "gorm.io/gorm"

type User struct {
	gorm.Model
	Tel      string `gorm:"type:char(11);unique;"`
	Password string `gorm:"type:char(32);"`
	Status   int    `gorm:"type:tinyint(1);default:1;"`
}

func (u *User) FindUser(tel string) error {
	return DB.Debug().Where("tel=?", tel).Find(&u).Error

}
